home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac 1
/
Ian and Stuart's One (Australia).iso
/
Australasian Legends
/
Commercial
/
Rainbow Hill
/
MacDOS™ 2.0.0
/
User's Guide
/
13.5 TREE - XCOPY
< prev
next >
Wrap
Text File
|
1994-09-20
|
10KB
|
322 lines
TREE
lists the contents of a folder by displaying its tree
structure graphically.
Syntax
tree [folder] [/[-]A[[:]attribute list]] [/[-]B]
[/C=creator] [/F] [/[-]L] [/[-]O[[:]ordering list]]
[/[-]P] [/[-]S] [/T=file type] [/[-]W]
Parameters
folder
identifies the folder at the root of the tree. It is a
folder name possibly preceded by a path and volume spec.
If you omit folder, TREE lists the contents of the current
folder.
Switches
TREE accepts all the switches of the DIR command, although
/B and /W have no effect. The switch /F, accepted for
compatibility with DOS, has also no effect.
The options set for DIR through the system variable DIRCMD
also apply to TREE.
Please refer to the section on DIR for the details.
MacDOS vs DOS
Format of the output
MacDOS always displays the tree list in ASCII and does not
implement the switch /A of DOS.
DIR switches
The MacDOS implementation of TREE supports all the switches
supported by DIR.
Switches
By default, MacDOS always displays the files. Therefore,
the switch /F of DOS does not have any effect.
Notes
Listing of files
MacDOS by default lists the files. You can suppress it with
the switch /A:-F.
Recursive listing
By default, MacDOS only lists the contents of the current
folder. To list the contents of subfolders hierarchically,
use the switch /S.
Examples
Please refer to the section about the command DIR.
See Also
DIR
TYPE
displays the content of a text file.
Syntax
type file [/H | /R]
Parameters
file
is the name of the file to be displayed, possibly preceded
by a volume and path spec. Unless you use one of the
switches, TYPE only displays files of type 'TEXT'.
Switches
/H
displays the data fork of file in HEX and ASCII. Non-
printing characters are replaced by periods (ie. dots). /H
is incompatible with /R.
/R
displays the resource fork of file in HEX and ASCII. Non-
printing characters are replaced by periods (ie. dots). /R
is incompatible with /H.
MacDOS vs DOS
DOS does not support the two switches to produce HEX dumps
of non-text files.
Notes
Long files
You can pause the listing by typing a cntl-S and resume it
with a cntl-Q.
Examples
type autoexec.bat
type c:\myDir\aTextFile
type/h data1 > \myHexDumps\data1.hex
type aFile.rsrc /r | more
Frequently occurring errors
E40: Not a file of type 'TEXT'
Without switches, TYPE can only display text files.
See Also
MORE
VER
displays the current version of MacDOS.
Syntax
ver
MacDOS vs DOS
The two implementations are identical.
VERIFY
directs MacDOS to verify that files are written correctly
when copied.
Syntax
verify [ ON | OFF ]
Parameters
[ ON | OFF ]
VERIFY ON directs MacDOS to verify the correctness of disk-
write operations when copying. VERIFY OFF disables the
verification function. Without parameters, VERIFY reports
the current setting.
MacDOS vs DOS
The two implementations are identical.
Examples
verify ON
VERIFY
verify off
VOL
displays the volume name.
Syntax
vol [volume]
Parameters
volume
is the volume ID. If you omit volume, VOL displays the name
of the current volume.
MacDOS vs DOS
Serial number
MacDOS does not display the serial number of the volume.
Write-protection
MacDOS notifies you if the volume is write-protected.
See Also
CD, SUBSTVOL
WRITE
writes a line of text to a file opened with OPEN.
Syntax
write fileID what
Parameters
fileID
is the number returned by OPEN. You can close the file with
the command CLOSE.
what
is the line of text to be appended to the file. Note that
the text must be enclosed in double quotes if it contains
spaces.
MacDOS vs DOS
DOS does not support WRITE.
Notes
Line termination
WRITE appends a Carriage Return character (CR) to each line
of text before storing it into the file.
Examples
write 3 "You bet!"
adds to file #3 a line of text containing the string:
"You bet!".
write %fileID% %aLine%
adds the text contained in the variable aLine to the
file whose ID is stored in the variable fileID.
Frequently occurring errors
E3: File not opened by the user
You attempted to WRITE a file without OPENing it.
See Also
OPEN, READ, CLOSE
XCOPY
copies folder contents and whole hierarchies of folders.
Syntax
xcopy source [destination] [/C=creator] [/D:date] [/E] [/P]
[/S] [/T=file type] [/V]
Parameters
source
is the name of the folder to be copied, possibly preceded
by a path and volume spec. Hidden files are not copied.
destination
is the name of an existing folder into which source is to
be copied, possibly preceded by a path and volume spec. It
defaults to the current folder. As files and folders cannot
be copied onto themselves, source and destination must
specify different folders.
Switches
/C=creator
specifies that only files of a particular creator are to be
copied. Note that no spaces are allowed on either side of
the equal sign and that the creator string is four
characters long. Therefore, if a creator includes spaces,
you must double quote the switch (eg. xcopy \ "/c=ABC "
copies all the files created by 'ABC ' in the root folder).
This switch does not apply to folders.
/D:date
only copies files changed on or after the specified date.
/E
recursively copies all [sub]folders, even if empty.
/P
prompts you for confirmation before creating each
destination file.
/S
recursively copies subfolders, except if empty.
/T=file type
specifies that only files of a particular type (eg. TEXT)
are to be copied. Note that no spaces are allowed on either
side of the equal sign and that the file type is four
characters long. Therefore, if a file type includes spaces,
you must double quote the switch (eg. xcopy \ "/t=ABC "
copies all the files of type 'ABC ' in the root folder).
This switch does not apply to folders.
/V
re-reads destination files to verify that they have been
copied correctly.
MacDOS vs DOS
Switches
MacDOS does not implement /A, /M, and /W, but introduces
the new switches /C and /T. MacDOS assumes /S when it
encounters /E, while with DOS the two switches are
independent.
Destination is a folder
MacDOS only accepts a folder specification as destination.
Folders replacing files
When a folder in source has the same name as a file in
destination, MacDOS deletes the file and then creates the
folder, thereby effectively replacing a file with a folder.
Nevertheless, the item identified in the parameter
destination itself must be a folder.
Folders becoming empty
With the switch /S (not /E), only non-empty folders are
copied. Nevertheless, this can result in empty folders in
the destination tree when /C or /T filters are applied and
no files in a particular source folder passes them.
Notes
Aliases
Aliases are not resolved. Therefore, aliased files and
folders appear in the destination folder as they appeared
in the source (ie. as aliases).
Specifying dates
When you use the switch /D and one or both of the date
field separators are slashes, enclose the switch in double
quotes. This is necessary to prevent MacDOS from
interpreting a date field as a switch.
Examples
xcopy dir1 dir2
copies the contents of the folder dir1 into the folder
dir2. Both dir1 and dir2 are subfolders of the current
folder.
xcopy/s dir1 a: "/d:93/09/20"
copies the contents of the folder dir1 to drive A. It
reproduces the hierarchical structure of dir1 but only
copies files modified on or after September 20th, 1993.
xcopy/e dir1 dir1Struct /c=mDOS /t=ABCD
duplicates the hierarchical structure of dir1 in the
folder dir1Struct. All destination folders remain empty
because MacDOS (creator 'mDOS') never generates files of
type 'ABCD'. Any non-existing creator, file-type, or
combination of them will achieve the same result.
Frequently occurring errors
E27: File or directory not found
The source parameter did not identify any file at all or
one of the folders specified in the path could not be
found. Note that creator and file type are case sensitive.
Therefore, /T=text will not find any file of type 'TEXT'.
E28: Bad switch
Perhaps you failed to specify a creator or file type
correctly. The equal sign is mandatory and all four
characters which form the OSType must be provided.
See Also
COPY